package com.assignwork.modules.workarrange;

import com.assignwork.service.IWorkArrangeShipUnderMachineService;
import com.assignwork.vo.WorkArrangeShipCabinInfoVO;
import com.assignwork.vo.WorkArrangeShipUnderMachineVO;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName WorkArrangeShipUnderMachineController
 * @Description 航运配工下舱机械前端控制器
 * @Author dujianyu
 * @Date 2023/12/22 12:33
 */
@RestController
@AllArgsConstructor
@RequestMapping("workArrange/underMachine")
public class WorkArrangeShipUnderMachineController extends BladeController {

    private IWorkArrangeShipUnderMachineService service;

    @GetMapping("/infoByCabinInfoId")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "航运配工下舱机械信息", notes = "传入cabinInfoId")
    public R<List<WorkArrangeShipUnderMachineVO>> infoByCabinInfoId(String cabinInfoId) {
        return R.data(service.infoByCabinInfoId(Func.toLong(cabinInfoId)));
    }

}
